.. _syntax-error,-unexpected-'{': syntax error, unexpected '{' ---------------------------- .. meta:: :description: syntax error, unexpected '{': This error arise when the old curly braces syntax is used to access an element in an array. :og:image: https://php-errors.readthedocs.io/en/latest/_static/logo.png :og:type: article :og:title: syntax error, unexpected '{' :og:description: This error arise when the old curly braces syntax is used to access an element in an array :og:url: https://php-errors.readthedocs.io/en/latest/messages/syntax-error%2C-unexpected-%27%7B%27.html :og:locale: en :twitter:card: summary_large_image :twitter:site: @exakat :twitter:title: syntax error, unexpected '{' :twitter:description: syntax error, unexpected '{': This error arise when the old curly braces syntax is used to access an element in an array :twitter:creator: @exakat :twitter:image:src: https://php-errors.readthedocs.io/en/latest/_static/logo.png .. raw:: html Description ___________ This error arise when the old curly braces syntax is used to access an element in an array. This syntax was deprecated in PHP 7.x and removed entirely in 8.0. It also was left as a syntax error since PHP 8.3. Example _______ .. code-block:: php Solutions _________ + Use the square brackets to access array elements. Changed Behavior ________________ This error may appear following an evolution in behavior, in previous versions. See ` `_.